package com.lzw.breezeNovel.webApp.controller.video;

import com.lzw.breezeNovel.common.result.Result;
import com.lzw.breezeNovel.webApp.service.video.ShortHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 清风明月
 * @Package com.lzw.breezeNovel.webApp.controller.video
 * @date 2025/3/24
 * @description 观看历史
 */
@RestController
@RequestMapping("/app/shortHistory")
@SuppressWarnings("all")
public class ShortHistoryController {

    /**
     * 注入service
     */
    @Autowired
    private ShortHistoryService shortHistoryService;

    /**
     * 保存观看历史
     */
    @RequestMapping("/save")
    public Result save(@RequestParam Long shortId, @RequestParam Long userId) {
        shortHistoryService.save(shortId, userId);
        return Result.ok();
    }

}
